ExposedMembers.SIV = ExposedMembers.SIV or {};
ExposedMembers.SIV.Utils = ExposedMembers.SIV.Utils or {};
SIVUtils = ExposedMembers.SIV.Utils;

local function LeaderHasTrait(playerId, sTrait)
	-- 根据 property 判断
	local player = Players[playerId];
	if player:GetProperty(sTrait .. "_CAPTURED") == true then
		return true;
	end

	-- 查表判断
	local playerConfig = PlayerConfigurations[playerId]
	local sLeader = playerConfig:GetLeaderTypeName()
	for tRow in GameInfo.LeaderTraits() do
		if (tRow.LeaderType == sLeader and tRow.TraitType == sTrait) then return
			true;
		end
	end

	return false;
end
SIVUtils.LeaderHasTrait = LeaderHasTrait;